package cn.xutongxue.book_sales.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * Created By TongXue Xu on 2021/12/22 21:43
 */
@TableName("carts")
public class Carts implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "cart_id", type = IdType.AUTO)
    private Integer cartId;

    @TableField("books_id")
    private Integer booksId;

    @TableField("books_name")
    private String booksName;


    @TableField("books_price")
    private BigDecimal booksPrice;

    @TableField("sum_price")
    private BigDecimal sumPrice;

    @TableField("cart_num")
    private Integer cartNum;

    @TableField("user_id")
    private Integer userId;

    public BigDecimal getBooksPrice() {
        return booksPrice;
    }

    public void setBooksPrice(BigDecimal booksPrice) {
        this.booksPrice = booksPrice;
    }

    public BigDecimal getSumPrice() {
        return sumPrice;
    }

    public void setSumPrice(BigDecimal sumPrice) {
        this.sumPrice = sumPrice;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }


    public Integer getCartId() {
        return cartId;
    }

    public void setCartId(Integer cartId) {
        this.cartId = cartId;
    }

    public Integer getBooksId() {
        return booksId;
    }

    public void setBooksId(Integer booksId) {
        this.booksId = booksId;
    }

    public String getBooksName() {
        return booksName;
    }

    public void setBooksName(String booksName) {
        this.booksName = booksName;
    }

    public Integer getCartNum() {
        return cartNum;
    }

    public void setCartNum(Integer cartNum) {
        this.cartNum = cartNum;
    }


    @Override
    public String toString() {
        return "Cart{" +
                "cartId=" + cartId +
                ", booksId=" + booksId +
                ", booksName=" + booksName +
                ", cartNum=" + cartNum +
                ", sumPrice=" + sumPrice +
                ", userId=" + userId +
                "}";
    }


}
